//
//  MainTabBarVC.swift
//  name
//
//  Created by lxm on 2018/12/16.
//  Copyright © 2018 lxm. All rights reserved.
//

import UIKit

class MainTabBarVC: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.tabBar.tintColor = UIColor.black;
        let storyBoard1 = UIStoryboard(name: "Home", bundle: nil)
        let nav1 = storyBoard1.instantiateViewController(withIdentifier: "HomeVC")
        nav1.title = "首页"
        let tabItem1 = UITabBarItem(title: "首页", image: nil, selectedImage: nil)
        tabItem1.titlePositionAdjustment = UIOffset(horizontal: 0,vertical: -15)
        
        let storyBoard2 = UIStoryboard(name: "Me", bundle: nil)
        let nav2 = storyBoard2.instantiateViewController(withIdentifier: "MeVC")
        nav2.title = "我的"
        let tabItem2 = UITabBarItem(title: "我的", image: nil, selectedImage: nil)
        tabItem2.titlePositionAdjustment = UIOffset(horizontal: 0,vertical: -15)
        
        
        self.viewControllers = [nav1,nav2];        
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
